
<?php
echo $this->assign('title', 'Administraci&oacute;n de Productos'); 
echo $this->Form->create('Producto', array('enctype' => 'multipart/form-data', 'class' => 'well'));
?>

<legend>Agregar Producto</legend>

<div class="accordion" id="accordion2">
	<div class="accordion-group">
		<div class="accordion-heading">
			<a class="accordion-toggle" data-toggle="collapse" href="#collapseOne">Datos</a>
		</div>
		<div id="collapseOne" class="accordion-body collapse in">
			<div class="accordion-inner">
				<div style="float:left; margin-left:30px">
			
<?php
echo $this->Form->input('nombre', array('error' => array('notEmpty' => __('No debe ser vacio'))));
echo $this->Form->input('descripcion');
echo $this->Form->input('m_id', array('label' => 'Marca', 'empty' => 'Seleccionar'));
echo $this->Form->input('destacado');
?>
<?php echo $this->Form->input('Producto.imagen', array('type' => 'file', 'class' => 'thumbnail', 'label' => 'Imagen', 'before' => '<br />'));?>
<?php echo $this->Form->input('Producto.imagendestacada', array('type' => 'file', 'class' => 'thumbnail', 'label' => 'Imagen Destacada', 'before' => '<br />'));?>
				</div>
				<div>
					<ul class="thumbnails">
					  <li class="span3" style="float:right; margin-right:30px">
						<a href="#" class="thumbnail">
						  <img src="http://placehold.it/120x160" alt="">
						</a>
					  </li>
					 </ul>
				</div>
			</div>
		</div>
	</div>
	<div class="accordion-group">
		<div class="accordion-heading">
			<a class="accordion-toggle" data-toggle="collapse" href="#collapseTwo">Rubros</a>
		</div>
		<div id="collapseTwo" class="accordion-body collapse">
			<div class="accordion-inner">
	
				<div id= "tablaRubros">

					<?php echo $this->Ajax->link('Ver Rubros', array('controller' => 'productos', 'action' => 'updateRubro', 1, 0), array( 'update' => 'tablaRubros')); ?>

				</div>
			</div>
		</div>
	</div>
	<div class="accordion-group">
		<div class="accordion-heading">
			<a class="accordion-toggle" data-toggle="collapse" href="#collapseThree">Lineas</a>
		</div>
		<div id="collapseThree" class="accordion-body collapse">
			<div class="accordion-inner">
	
				<div id= "tablaLineas">

					<?php echo $this->Ajax->link('Ver Lineas', array('controller' => 'productos', 'action' => 'updateLinea', 1, 0), array( 'update' => 'tablaLineas')); ?>

				</div>
			</div>
		</div>
	</div>
</div>

<div class="btn-toolbar">
	<div class="btn-group">
<?php
echo $this->Form->submit('Guardar', array('class' => 'btn btn-primary', 'div' => false));
echo '</div>';
echo '<div class="btn-group">';
echo $this->Html->link('Cancelar', array('action' => 'index'), array('class' => 'btn'));
echo '</div>';
echo '</div>';
echo $this->Form->end();
?>

		
